//
//  WeatherOneColletionViewCell.m
//  B-72K
//
//  Created by sos on 16/3/16.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "WeatherOneColletionViewCell.h"

@implementation WeatherOneColletionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.labelOne = [[UILabel alloc]init];
        //        self.labelOne.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:self.labelOne];
        
        self.labelTwo = [[UILabel alloc]init];
        //        self.labelTwo.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.labelTwo];
        
        self.img = [[UIImageView alloc]init];
        //        self.img.backgroundColor = [UIColor brownColor];
        [self.contentView addSubview:self.img];
        
        self.labelThree = [[UILabel alloc]init];
        //        self.labelThree.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:self.labelThree];
        
        self.labelFour = [[UILabel alloc]init];
        //        self.labelFour.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.labelFour];
        
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.labelOne.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, 20*H);
    self.labelOne.font = [UIFont systemFontOfSize:15];
    self.labelOne.textColor = [UIColor whiteColor];
    self.labelOne.textAlignment = NSTextAlignmentCenter;
    
    
    self.labelTwo.frame = CGRectMake(0, 30*W, layoutAttributes.frame.size.width, 20*H);
    self.labelTwo.textAlignment = NSTextAlignmentCenter;
    self.labelTwo.textColor = [UIColor whiteColor];
    self.labelTwo.font = [UIFont systemFontOfSize:11];
    
    self.img.frame = CGRectMake(0, 60*W, layoutAttributes.frame.size.width, 40*H);
    
    self.labelThree.frame = CGRectMake(0, 110*W, layoutAttributes.frame.size.width, 20*H);
    self.labelThree.textColor = [UIColor whiteColor];
    self.labelThree.textAlignment = NSTextAlignmentCenter;
    
    self.labelFour.frame = CGRectMake(0, 130*W, layoutAttributes.frame.size.width, 20*H);
    self.labelFour.textColor = [UIColor whiteColor];
    self.labelFour.textAlignment = NSTextAlignmentCenter;
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
